<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>09-BFC</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      /* .box1 {
        width: 400px;
        height: 400px;
        background-color: yellowgreen;
        margin-top: 10px;
        overflow: hidden;
      }
      .box2 {
        width: 200px;
        height: 200px;
        background-color: tomato;
        margin-top: 20px;
      } */

      /* .box1 {
        width: 400px;
        background-color: yellowgreen;
        overflow: hidden;
      }
      .box2 {
        width: 200px;
        height: 200px;
        background-color: tomato;
        float: left;
      } */

      .box1 {
        width: 200px;
        height: 200px;
        background-color: yellowgreen;
        float: left;
      }
      .box2 {
        width: 400px;
        height: 400px;
        background-color: tomato;
        overflow: hidden;
      }
    </style>
  </head>
  <body>
    <!-- 
            BFC:块级格式化上下文
         -->

    <!-- <div class="box1">
      <div class="box2"></div>
    </div> -->

    <div class="box1"></div>
    <div class="box2"></div>
  </body>
</html>
